package metier;

public class Espece {
	private int especeID;
	private String libelle;
	private int nbPoissons;
	
	public Espece(int especeID, String libelle, int nbPoissons) {
		super();
		this.especeID = especeID;
		this.libelle = libelle;
		this.nbPoissons = nbPoissons;
	}
	
	
	
	public int getEspeceID() {
		return especeID;
	}
	public void setEspeceID(int especeID) {
		this.especeID = especeID;
	}
	public String getLibelle() {
		return libelle;
	}
	public void setLibelle(String libelle) {
		this.libelle = libelle;
	}
	public int getNbPoissons() {
		return nbPoissons;
	}
	public void setNbPoissons(int nbPoissons) {
		this.nbPoissons = nbPoissons;
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + especeID;
		result = prime * result + ((libelle == null) ? 0 : libelle.hashCode());
		result = prime * result + nbPoissons;
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Espece other = (Espece) obj;
		if (especeID != other.especeID)
			return false;
		if (libelle == null) {
			if (other.libelle != null)
				return false;
		} else if (!libelle.equals(other.libelle))
			return false;
		if (nbPoissons != other.nbPoissons)
			return false;
		return true;
	}
	@Override
	public String toString() {
		StringBuilder stringBuilder = new StringBuilder();
		stringBuilder.append("Espece [especeID=");
		stringBuilder.append(especeID);
		stringBuilder.append(", libelle=");
		stringBuilder.append(libelle);
		stringBuilder.append(", nbPoissons=");
		stringBuilder.append(nbPoissons);
		stringBuilder.append("]");
		return stringBuilder.toString();
	}
	
	
	
	

}
